package com.khadi.testcase.util;

import java.util.HashMap;
import java.util.Map;

public class SessionUtil {

	private Map<String, Object> sessionMap;

	private static SessionUtil instance;

	private SessionUtil() {

	}

	public static SessionUtil getInstance() {
		if (instance == null) {
			instance = new SessionUtil();
		}
		return instance;
	}

	public void setSessionObject(String property, Object value) {
		if (sessionMap == null) {
			sessionMap = new HashMap<String, Object>();
		}
		sessionMap.put(property, value);
	}

	public Map<String, Object> getSessionMap() {
		if (sessionMap == null) {
			sessionMap = new HashMap<String, Object>();
		}
		return sessionMap;
	}

	public static final String SELENIUM_OBJECT = "seleniumObject";
	public static final String WEB_DRIVER = "webDriver";
	public static final String WORK_FLOW = "WORK_FLOW";
}
